package com.y.architecture.activity;

import android.os.Bundle;
import android.support.v4.app.Fragment;

import com.y.architecture.R;
import com.y.architecture.base_tab.BaseTabPagerActivity;
import com.y.architecture.fragment.WeatherFragment;

/**
 * Created by youjingjing on 2017/11/29.
 */

public class TabDemoActivity extends BaseTabPagerActivity<TabEntity> {


    @Override
    public int getContentView() {
        return R.layout.activity_tab_demo;
    }

    @Override
    public void initViews(Bundle savedInstanceState) {

    }

    @Override
    public String getTitleText() {
        return "";
    }

    @Override
    public void getData() {
        mItems.add(new TabEntity("厦门"));
        mItems.add(new TabEntity("莆田"));
        mItems.add(new TabEntity("福州", "iOS"));
        mItems.add(new TabEntity("杭州", "休息视频"));
        createPager();
    }

    @Override
    public Fragment getContent(int position) {
        return  new WeatherFragment(mItems.get(position).getTitle());
    }
}
